CLASS lhc_zr_ymoon_t_150 DEFINITION INHERITING FROM cl_abap_behavior_handler.
  PRIVATE SECTION.
    METHODS:
      get_global_authorizations FOR GLOBAL AUTHORIZATION
        IMPORTING
        REQUEST requested_authorizations FOR zrymoont150
        RESULT result,
      customdelete FOR MODIFY
        IMPORTING keys FOR ACTION zrymoont150~customdelete RESULT result.
ENDCLASS.

CLASS lhc_zr_ymoon_t_150 IMPLEMENTATION.
  METHOD get_global_authorizations.
  ENDMETHOD.
  METHOD customdelete.
*    READ ENTITIES OF zr_ymoon_t_150 IN LOCAL MODE
*    ENTITY zrymoont150
*    ALL FIELDS WITH CORRESPONDING #( keys )
*    RESULT DATA(lt_result).

    MODIFY ENTITIES OF zr_ymoon_t_150 IN LOCAL MODE
    ENTITY zrymoont150
    UPDATE FROM VALUE #( FOR key IN keys (
    %tky = key-%tky
    status = 'D'
    %control-status = if_abap_behv=>mk-on
    )
    )
    FAILED failed
    REPORTED reported.

*    MODIFY ENTITIES OF zr_ymoon_t_150 IN LOCAL MODE
*        ENTITY zrymoont150
*        DELETE FROM CORRESPONDING #( keys )
*        FAILED failed
*        REPORTED reported.


    READ ENTITIES OF zr_ymoon_t_150 IN LOCAL MODE
    ENTITY zrymoont150
    ALL FIELDS WITH CORRESPONDING #( keys )
    RESULT DATA(lt_result).

*    LOOP AT keys ASSIGNING FIELD-SYMBOL(<key>).
*      IF <key>-MATNR = '54G'.
*        APPEND VALUE #( %msg      = new_message_with_text(
*             severity  = if_abap_behv_message=>severity-warning
*             text      = '하위메뉴가 있는 폼' && <key>-matnr && '를 삭제합니다.' )
*             %tky      = <key>-%tky )
*             TO reported-zrymoont150.
*      ELSE.
*        APPEND VALUE #( %msg      = new_message_with_text(
*                   severity  = if_abap_behv_message=>severity-warning
*                   text      = '폼' && <key>-matnr && '를 삭제합니다.' )
*                   %tky      = <key>-%tky )
*                   TO reported-zrymoont150.
*      ENDIF.
*    ENDLOOP.

    DATA(LS_KEY) = KEYS[ 1 ].
    APPEND VALUE #( %msg      = new_message_with_text(
             severity  = if_abap_behv_message=>severity-warning
             text      = '하위메뉴가 있는 폼 ASPN100,ASPN200,ASPN300 을(를) 삭제합니다.' )
             %tky      = LS_KEY-%tky )
             TO reported-zrymoont150.


    result = VALUE #( FOR rt IN lt_result ( %tky = rt-%tky %param = rt ) ).


  ENDMETHOD.

ENDCLASS.
